home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / riblitzlibs.lha / riblitzlibs / gfx / GFX_Library.DOC next >
Text File  |  1994-06-08  |  6KB  |  157 lines

  1. GFX Library v0.1
  2. ================
  3.  
  4. By Stephen McNamara and Steve Matty
  5. (c)1994 Reflective Images
  6.  
  7. This library contains commands for the control of palette objects inside
  8. Blitz2.  These are just simple commands that allow either interrogation of
  9. the palette objects are modifications to the colour values contained in
  10. them.  After changing the palette with these commands, you'll have to do
  11. either a USE PALETTE or DISPLAYPALETTE (whichever is applicable to what
  12. you're doing) to make the changes come into effect on your screen.
  13.  
  14. Please feel free to critisise (or praise!) this library, send me anything
  15. you want to say about it at:
  16.  
  17.     SIS3149@SISVAX.PORT.AC.UK
  18.         or
  19.     SIS3147@SISVAX.PORT.AC.UK
  20.  
  21. Or send us anything you've written........
  22.  
  23.  
  24. Command list:
  25.             PaletteInfo palette#
  26.             r.w=PalRed (Colour#)
  27.             g.w=PalGreen (Colour#)
  28.             b.w=PalBlue (Colour#)
  29.             r.w=AGAPalRed (Colour#)
  30.             g.w=AGAPalGreen (Colour#)
  31.             b.w=AGAPalBlue (Colour#)
  32.             PalAdjust dest_palette#,ration.q[,start_col,end_col]
  33.             FillPalette palette#,r,g,b[start_col,end_col]
  34.             AGAFillPalette palette#,r,g,b[start_col,end_col]
  35.  
  36. Statement: PaletteInfo
  37. ------------------------------------------------------------------------
  38. Modes : Amiga/Blitz
  39. Syntax: PaletteInfo Palette#
  40.  
  41.   This command is used to specify the palette object that all palette
  42. interrogations should look at.  The majority of the commands use this
  43. palette object as the source for their data, e.g. PalRed(1) will look at
  44. the red value of colour 1 of the palette last used in a PaletteInfo
  45. command.
  46.  
  47.  
  48. Function: PalRed
  49. ------------------------------------------------------------------------
  50. Modes : Amiga/Blitz
  51. Syntax: r.w=PalRed (Colour#)
  52.  
  53.   This command is used to get the red value of colour number Colour#.  You
  54. should use the PaletteInfo command to specify what palette this command
  55. takes its information from.
  56.   The value returned will be from 0 to 15
  57.  
  58. Function: PalGreen
  59. ------------------------------------------------------------------------
  60. Modes : Amiga/Blitz
  61. Syntax: g.w=PalGreen (Colour#)
  62.  
  63.   This command is used to get the green value of colour number Colour#.
  64. You should use the PaletteInfo command to specify what palette this command
  65. takes its information from.
  66.   The value returned will be from 0 to 15
  67.  
  68. Function: PalBlue
  69. ------------------------------------------------------------------------
  70. Modes : Amiga/Blitz
  71. Syntax: b.w=PalBlue (Colour#)
  72.  
  73.   This command is used to get the blue value of colour number Colour#.  You
  74. should use the PaletteInfo command to specify what palette this command
  75. takes its information from.
  76.   The value returned will be from 0 to 15
  77.  
  78. Function: AGAPalRed
  79. ------------------------------------------------------------------------
  80. Modes : Amiga/Blitz
  81. Syntax: r.w=AGAPalRed (Colour#)
  82.  
  83.   This command is used to get the red value of colour number Colour#.  You
  84. should use the PaletteInfo command to specify what palette this command
  85. takes its information from.
  86.   The value returned will be from 0 to 255, this number of shades, though,
  87. can only be displayed on an AGA machine.
  88.  
  89. Function: AGAPalGreen
  90. ------------------------------------------------------------------------
  91. Modes : Amiga/Blitz
  92. Syntax: g.w=AGAPalGreen (Colour#)
  93.  
  94.   This command is used to get the green value of colour number Colour#.
  95. You should use the PaletteInfo command to specify what palette this command
  96. takes its information from.
  97.   The value returned will be from 0 to 255, this number of shades, though,
  98. can only be displayed on an AGA machine.
  99.  
  100. Function: AGAPalBlue
  101. ------------------------------------------------------------------------
  102. Modes : Amiga/Blitz
  103. Syntax: b.w=AGAPalBlue (Colour#)
  104.  
  105.   This command is used to get the blue value of colour number Colour#.  You
  106. should use the PaletteInfo command to specify what palette this command
  107. takes its information from.
  108.   The value returned will be from 0 to 255, this number of shades, though,
  109. can only be displayed on an AGA machine.
  110.  
  111.  
  112. Statement: PalAdjust
  113. ------------------------------------------------------------------------
  114. Modes : Amiga/Blitz
  115. Syntax: PalAdjust dest_palette#,ration.q[,start_col,end_col]
  116.  
  117.   This command is used to multiple all the colours, or a range of colours,
  118. in a palette object, by a ratio.  The dest_palette# arguement is used to
  119. give a destination for the adjusted colour information.  This destination
  120. should be a pre-reserved palette and should be AT LEAST as big and the
  121. source palette.  The source palette is taken as being the palette last used
  122. in the PaletteInfo command.
  123.   The ratio should be given as either a quick value or a float and should
  124. be below one for a fade or above to lighten a palette.  If you give a ratio
  125. of 1 then a palette copy will occur.
  126.   The optional start and end parameters let you specify the range of
  127. colours to adjust.  Only this range of colours, though, will be adjusted
  128. and stored in the destination palette.
  129.  
  130.  
  131. Statement: FillPalette
  132. ------------------------------------------------------------------------
  133. Modes : Amiga/Blitz
  134. Syntax: FillPalette palette#,r,g,b[start_col,end_col]
  135.  
  136.   This command lets you fill a given palette object with specific r,g,b
  137. values.  The values given should be between 0 to and 15.  Optionally, you
  138. can give start and end colour numbers to set a range for the fill.  You
  139. should be careful, though, because when you specify a range, no checking is
  140. done (at the moment) to make sure that you don't exceed the colour limit of
  141. the palette.
  142.   You should note that this command does not work on the palette last
  143. PaletteInfo'ed.
  144.  
  145.  
  146. Statement: AGAFillPalette
  147. ------------------------------------------------------------------------
  148. Modes : Amiga/Blitz
  149. Syntax: AGAFillPalette palette#,r,g,b[start_col,end_col]
  150.  
  151.   This command is identical to FillPalette except that it lets you specify
  152. AGA shade values for the r,g,b parameters.
  153.   See FillPalette for more information.
  154.  
  155.  
  156. >> END
  157.